<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        
    </style>
</head>
<body>
    
</body>
<script>
    function Parent(m){
        this.message = m;
    }
    Parent.prototype.show = function(){
        console.log(this.message);
    }

    function Child(m){}
    Child.prototype = new Parent("hello 世界");
    Child.prototype.show = function(){
        console.log("改写的show")
    }

    const p = new Parent("hello world");
    p.show();
    console.log(p.message);
    console.log(p);

    const c = new Child();
    c.show();
    console.log(c.message);
    console.log(c);


</script>
</html>